package guava.collections;

import com.google.common.collect.HashBasedTable;
import com.google.common.collect.Table;
import org.junit.Test;

/**
 * @author jiangwz
 * @create 2022/3/10.
 */
public class TableDemo {

    @Test
    public void testTable() {

        Table<String, String, Integer> table = HashBasedTable.create();
//存放元素
        table.put("Hydra", "Jan", 20);
        table.put("Hydra", "Feb", 28);

        table.put("Trunks", "Jan", 28);
        table.put("Trunks", "Feb", 16);

//取出元素
        Integer dayCount = table.get("Hydra", "Feb");
    }
}
